<?php

/*
 * 页面位置查询
 */

namespace Admin\Func;

class Func999010102 {

    var $db;
    var $rst;
    var $errmsg;
    var $MenuID;

    public function __construct($MenuID) {
        $this->db = new \Think\Model();
        $this->errmsg = '';
        $this->MenuID = addslashes($MenuID);
    }

    /*
     * 获取错误信息
     */

    public function getErrMsg() {
        return $this->errmsg;
    }

    /*
     * 验证
     */

    private function validate() {
        return true;
    }

    /*
     * 执行
     */

    public function execute() {
        $vflag = true;
        $OperID = I('OperID');
        if ($this->validate()) {

            $forthsql = <<<EOD
SELECT * FROM t_lz_sys_menu_config  T WHERE 1=1  AND T.MenuID = '$this->MenuID' 

EOD;
            $forth = $this->db->query($forthsql);
            $vthirdMenuID = $forth[0]["supermenuid"];
            $thirdsql = <<<EOD
SELECT * FROM t_lz_sys_menu_config  T WHERE 1=1  AND T.MenuID = '$vthirdMenuID' 

EOD;
            $third = $this->db->query($thirdsql);
            $vsecondMenuID = $third[0]["supermenuid"];
            $secondsql = <<<EOD
SELECT * FROM t_lz_sys_menu_config  T WHERE 1=1  AND T.MenuID = '$vsecondMenuID' 

EOD;
            $second = $this->db->query($secondsql);
            $vfirstMenuID = $second[0]["supermenuid"];
            $firstsql = <<<EOD
SELECT * FROM t_lz_sys_menu_config  T WHERE 1=1  AND T.MenuID = '$vfirstMenuID' 

EOD;
            $first = $this->db->query($firstsql);

            $this->rst = $first[0]["menuname"] . '>' . $second[0]["menuname"] . '>' . $third[0]["menuname"] . '>' . $forth[0]["menuname"];
            if ($this->rst === false) {
                $this->errmsg = $this->db->getDbError();
                $vflag = false;
            } else {
                $vflag = true;
            }
        } else {
            $vflag = false;
        }
        return $vflag;
    }

    public function getRst() {
        return $this->rst;
    }

}
